package com.atguigu.jxc.service;

import com.atguigu.jxc.entity.SaleList;
import com.atguigu.jxc.entity.SaleListGoods;
import com.atguigu.jxc.entity.vo.CustomerGoodsVo;
import com.atguigu.jxc.entity.vo.SaleDataByDayOrMonthVo;

import java.util.List;

/**
 * @author qingyu
 * @create 2022-01-02 18:37
 * @description
 */
public interface SaleListGoodsService {

    /**
     * 销售单保存 并减库存
     * @param saleList
     * @param saleListGoodsStr
     * @param saleNumber
     */
    void save(SaleList saleList, String saleListGoodsStr, String saleNumber);

    /**
     * 查询销售单商品信息
     * @param saleListId
     * @return
     */
    List<SaleListGoods> goodsList(Integer saleListId);

    /**
     * 通过saleListId删除销售单商品信息
     * @param saleListId
     */
    void delete(Integer saleListId);


    void updateState(Integer saleListId);

    List<CustomerGoodsVo> count(String sTime, String eTime, Integer goodsTypeId, String codeOrName);

    List<SaleDataByDayOrMonthVo> getSaleDataByDay(String sTime, String eTime);

    List<SaleDataByDayOrMonthVo> getSaleDataByMonth(String sTime, String eTime);
}
